]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
overview, appDisplay: add Dash to Ctrl-Alt-Tab
authorDan Winship <danw@gnome.org>
Thu, 3 Feb 2011 17:38:03 +0000 (12:38 -0500)
committerDan Winship <danw@gnome.org>
Mon, 7 Mar 2011 16:15:05 +0000 (11:15 -0500)
Add the dash to Ctrl-Alt-Tab, add appropriate :focus CSS, and connect
to the popup-menu signal on dash icons.

https://bugzilla.gnome.org/show_bug.cgi?id=618887

data/theme/gnome-shell.css
js/ui/appDisplay.js
js/ui/overview.js

index da69a3e673f03b8e7beea726485a9a0178235646..cfcec9e0aa3bfd0abedf95d420a79e3d1a028f41 100644 (file)
@@ -593,7 +593,8 @@ StTooltip StLabel {
 .remove-favorite > .overview-icon,
 .search-result-content > .overview-icon {
     border-radius: 4px;
-    padding: 4px;
+    padding: 3px;
+    border: 1px rgba(0,0,0,0);
     font-size: 10px;
     color: white;
     transition-duration: 100;
@@ -618,6 +619,11 @@ StTooltip StLabel {
     transition-duration: 100;
 }
 
+.app-well-app:focus > .overview-icon,
+.search-result-content:focus > .overview-icon {
+    border: 1px solid #cccccc;
+}
+
 .app-well-menu {
     font-size: 12px
 }
index b9f4b1fb4a286c1e7ae5fe027ba34665ea3852db..0433cec007ed79b5552c52aee8f4a4fa6cd86c06 100644 (file)
@@ -352,6 +352,7 @@ AppWellIcon.prototype = {
         this.actor = new St.Button({ style_class: 'app-well-app',
                                      reactive: true,
                                      button_mask: St.ButtonMask.ONE | St.ButtonMask.TWO,
+                                     can_focus: true,
                                      x_fill: true,
                                      y_fill: true });
         this.actor._delegate = this;
@@ -361,6 +362,7 @@ AppWellIcon.prototype = {
 
         this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPress));
         this.actor.connect('clicked', Lang.bind(this, this._onClicked));
+        this.actor.connect('popup-menu', Lang.bind(this, this._onKeyboardPopupMenu));
 
         this._menu = null;
         this._menuManager = new PopupMenu.PopupMenuManager(this);
@@ -437,6 +439,11 @@ AppWellIcon.prototype = {
         return false;
     },
 
+    _onKeyboardPopupMenu: function() {
+        this.popupMenu();
+        this._menu.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
+    },
+
     getId: function() {
         return this.app.get_id();
     },
@@ -454,6 +461,7 @@ AppWellIcon.prototype = {
                 if (!isPoppedUp)
                     this._onMenuPoppedDown();
             }));
+            Main.overview.connect('hiding', Lang.bind(this, function () { this._menu.close(); }));
 
             this._menuManager.addMenu(this._menu);
         }
index 177295c4332cf07a0eac33e8aa453adaed98e90d..ad02d1344373b65e43cb9ac3d68d75b157dd369b 100644 (file)
@@ -197,6 +197,10 @@ Overview.prototype = {
         this.dash.actor.add_constraint(this.viewSelector.constrainY);
         this.dash.actor.add_constraint(this.viewSelector.constrainHeight);
 
+        // Translators: this is the name of the dock/favorites area on
+        // the left of the overview
+        Main.ctrlAltTabManager.addGroup(this.dash.actor, _("Dash"), 'user-bookmarks');
+
     },
 
     _onDragBegin: function() {